![]() |
SeedFill |
||||
Header: | Quickdraw.h | Carbon status: | Supported | |
Determines how far filling will extend from a seeding point.
void SeedFill ( const void *srcPtr, void *dstPtr, SInt16 srcRow, SInt16 dstRow, SInt16 height, SInt16 words, SInt16 seedH, SInt16 seedV );
A pointer to the source bit image.
On input, a pointer to the destination bit image; upon return, a pointer to the bitmap containing the resulting mask.
Row width of the source bitmap.
Row width of the destination bitmap.
Height (in pixels) of the fill rectangle.
Width (in words) of the fill rectangle.
The horizontal offset (in pixels) at which to begin filling the destination bit image.
The vertical offset (in pixels) at which to begin filling the destination bit image.
The SeedFill function produces a mask showing where bits in an image can be filled from a starting point, like the paint pouring from the MacPaint paint-bucket tool. The SeedFill returns this mask in the dstPtr parameter. This mask is a bitmap filled with 1’s only where the pixels in the source image can be filled. You can then use this mask with the CopyBits, CopyMask, and CopyDeepMask functions.
Point to the bit image you want to fill with the srcPtr parameter, which can point to the image’s base address or a word boundary within the image. Specify a pixel height and word width with the height and words parameters to define a fill rectangle that delimits the area you want to fill. The fill rectangle can be the entire bit image or a subset of it. Point to a destination image with the dstPtr parameter. Specify the row widths of the source and destination bitmaps (their rowBytes values) with the srcRow and dstRow parameters. (The bitmaps can be different sizes, but they must be large enough to contain the fill rectangle at the origins specified by the srcPtr and dstPtr parameters.)
You specify where to begin filling with the seedH and seedV parameters: they specify a horizontal and vertical offset in pixels from the origin of the image pointed to by the srcPtr parameter. The SeedFill function calculates contiguous pixels from that point out to the boundaries of the fill rectangle, and it stores the result in the bit image pointed to by the dstPtr parameter.
Calls to SeedFill are not clipped to the current port and are not stored into QuickDraw pictures.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)